import request from '@/utils/request'

// 列表数据
export const getRoleList = (params) => request.get('/sys/role', {
  params
})

// 新增
export const addRole = (data) => request.post('/sys/role', data)

// 修改角色
export const updateRole = (data) => request.put(`/sys/role/${data.id}`, data)

// 删除角色‘
export const delRole = (id) => request.delete(`/sys/role/${id}`)

// 获取角色详情
export const getRoleDetail = (id) => request.get(`/sys/role/${id}`)

// 分配权限
export const assignPrem = (data) => request.put('/sys/role/assignPrem', data)
